<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Vue入门指南-模板语法</title>
    <link rel="stylesheet" href="common.css">
    <script type="importmap">
        {
            "imports":{
                "vue":"http://lib.baomitu.com/vue/latest/vue.esm-browser.js"
            }
        }
    </script>
</head>
<body>
    <div id="app">
        <p>{{msg}}</p>
        <p><span v-html="rawHtml"></span></p>
        <p><a v-bind:href="myUrl">属性绑定</a></p>
        <p>插值中使用简单Javascript表达式 - {{number+1}}</p>
        <p><span id="`id-${number}`">属性中使用简单表达式</span></p>
    </div>
    <script type="module">
        import {createApp} from "vue";
        createApp({
            data() {
                return {
                    msg:"文本插值 --{{}}",
                    rawHtml:`<span style="color:red">原始html</span>`,
                    myUrl:"https://www.baidu.com",
                    number:0
                }
            },
        }).mount("#app")
    </script>
</body>
</html>